package com.ting.test.algorithms.堆.加强堆;

public class Main {

    public static void main(String[] args) {
        int[] arr = new int[]{2, 5, 9, 4, 1, 8, 24, 6};
        int[] ar2 = new int[]{2, 5, 9, 4, 1, 8, 24, 6};
        Heap<Integer> heap = new Heap<Integer>(new MyIntComparator());
        for (int i : arr) {
            System.out.print(i + ",");
        }
        System.out.println();
        for (int i : arr) {
           heap.heapInsert(i);
        }
        for (Integer i : heap.heap) {
            System.out.print(i + ",");
        }

        System.out.println();
//        System.out.print(heap.heapPop(6));
        System.out.print(heap.heapPop(9));

    }

}
